var express = require("express");
var router = express.Router();

/* GET home page. */
router.get("/", function (req, res, next) {
  res.render("index", { title: "Express" });
});

router.get("/index", function (req, res, next) {
  let banner = [
    {
      id: 1,
      src: "/images/index/css3.jpg",
      name: "css3",
      isBanner: true,
    },
    {
      id: 2,
      src: "/images/index/html5.jpg",
      name: "html5",
      isBanner: true,
    },
    {
      id: 3,
      src: "/images/index/jquery.jpg",
      name: "jquery",
      isBanner: true,
    },
    {
      id: 4,
      src: "/images/index/php.jpg",
      name: "php",
      isBanner: true,
    },
  ];

  res.send(banner);
});

module.exports = router;
